package cn1socket;

import com.codename1.system.NativeInterface;

/**
 * Created by Franklin on 5/1/14.
 */
public interface NativeSocket extends NativeInterface {
	public String getException();
	public String getExceptionMessage();
	public void connect(String host,int port);
	public void close();

	// InputStream
	public int available();
	public int read();
	public byte[] read(int length);

	// OutputStream
	public void flush();
	public void write(int b);
	public void writeBuffer(byte[] b);
	public void writeBuffer(byte[] b, int off, int len);
}
